using System;
using System.Data;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Collections;
using System.Collections.Generic;

namespace UcAsp.Models
{
      [Table("Comments")]
      public class Comments
      {
          [Key]  
         public int ID { get; set; }
         public int ArticleID { get; set; }
         public int UserID { get; set; }
         public string UserName { get; set; }
         public string Title { get; set; }
         public string PublichContent { get; set; }
         public DateTime PublicDate { get; set; }
         public int ParentID { get; set; }
         public DateTime ReplyDateTime { get; set; }
         public bool  IsRelease { get; set; }
         [ForeignKey("ArticleID")]
         public Articles Articles { get; set; }
         [ForeignKey("UserID")]
         public UserInfo UserInfo { get; set; }
         [ForeignKey("ParentID")]
         public Comments Replay { get; set; }

         } 
} 
